package com.bqtt.tumor.demo.common.static_struct;

import java.util.ArrayList;
import java.util.List;

import  com.bqtt.tumor.demo.entity.FunctionListItem;
public class FunctionList {


	private static List<FunctionListItem> functionList = new ArrayList<FunctionListItem>();
	
	
	public FunctionList()
	{
		FunctionListItem item1 = new FunctionListItem("no-selected","病人信息","health_user", 1);
		FunctionListItem item2 = new FunctionListItem("no-selected","疾病实例","medical_case", 1);
		FunctionListItem item3 = new FunctionListItem("no-selected","诊疗跟踪","treatment_track", 1);
		FunctionListItem item4 = new FunctionListItem("no-selected","诊断方法","diagnosis_method_def", 1);
		FunctionListItem item5 = new FunctionListItem("no-selected","治疗方法","treatment_method_def", 1);
		FunctionListItem item6 = new FunctionListItem("no-selected","疾病表","desease_def", 1);
		FunctionListItem item7 = new FunctionListItem("no-selected","特征表","feature_def", 1);
		FunctionListItem item8 = new FunctionListItem("no-selected","化验单定义","lab_sheet_def", 1);
		FunctionListItem item9 = new FunctionListItem("no-selected","化验单项","lab_sheet_field_def", 1);
		FunctionListItem item10 = new FunctionListItem("no-selected","化验单结果","lab_sheet_result", 1);
		FunctionListItem item11 = new FunctionListItem("no-selected","药物表","medicine_def", 1);
		FunctionListItem item12 = new FunctionListItem("no-selected","系统用户","sys_user", 1);
	}
	
	/** 根据权限返回功能列表，权限数值越低，权限越高
	 * @param privilege
	 * @return
	 */
	public static List<FunctionListItem> getListByPrivilege(int privilege)
	{
		List<FunctionListItem>  result = new ArrayList<FunctionListItem>();
		for(FunctionListItem item:functionList)
		{
		   if(item.privilege>=privilege)
		   {
			   result.add(item);
		   }
		}
		return result;
	}
	
	
}
